package com.mygenostics.backing;

import com.mygenostics.bo.ShoppingCart;
import com.mygenostics.misc.WebUtil;

import static com.mygenostics.constants.SessionConstants.*;

public class ShoppingCartBacking {
	
	public ShoppingCart getShoppingCart() {
		ShoppingCart shoppingCart = (ShoppingCart)WebUtil.getSessionMap().get(SHOPPING_CART);
		
		if (shoppingCart == null) {
			shoppingCart = new ShoppingCart();
		}
		
		return shoppingCart;
	}
	
	public String checkout() {
		return "to_checkout_page";
	}
}
